(function($) {
	const Cookies = require('js-cookie');

	/**
	 * 设置Cookie值
	 * @param {String} key
	 * @param {String,Object} value
	 * @param options
	 */
	function setCookie(key, value, options = {}) {
		Cookies.set(key, value, options);
	}

	$.define('setCookie', setCookie);

	/**
	 * 获取Cookie值
	 * @param {String} key
	 * @param {Boolean} isJsonParse
	 * @return {*}
	 */
	function getCookie(key, isJsonParse = false) {
		return Cookies.get(key);
	}

	$.define('getCookie', getCookie);

	/**
	 * 删除Cookie
	 * @param {String} key
	 */
	function removeCookie(key) {
		Cookies.remove(key);
	}

	$.define('removeCookie', removeCookie);
})($);
